package com.a;

public class faces {
    public static void main(String[] args) {

        //数组最大值
        int[] facescores={15,900,1000,2000,950,-10};
        int max=facescores[0];

        for(int i=1;i<facescores.length;i++)
        {
            if(facescores[i]>max)
            {
                //法1：
                max=facescores[i];
                //法2：
            /*    int t=max;
                max=facescores[i];
                facescores[i]=t;*/
            }
        }
        System.out.println("颜值最高分为："+max);

        //数组反转
        int left=0;
        int right=facescores.length-1;
        for( int j=0;j<(facescores.length/2);j++)
        {
             if(left<right)
             {
                 int t=facescores[left];
                 facescores[left]=facescores[right];
                 facescores[right]=t;
             }
             left++;
             right--;
        }

        for(int j=0;j<facescores.length;j++)
        {
            System.out.println(facescores[j]);
        }


    }
}
